<template>
<!--index.wxml-->

  <view class="container">
    <view class="swiper-box">
      <view class="nickname-box">
        <view class="nickname">
         
          <view style="margin-bottom:30px;">{{biaoti}}</view>
         
        </view>
      </view>
	  
      <image src="https://shops.cg500.com/static/aijiu/bg@2x.png" class="backimg"></image>
     
    </view>
    <view class="list-mine">
      <view class="inner">
        <view class="inner-title">
          <!-- <image src="/static/images/round.png" style="width:17px;height:17px;margin-right:5px;"></image> -->
		  <view style="width:17px;height:17px;margin-right:5px;border-radius: 50%;background-color: #a7773f;"> </view>
          <view>{{title}}</view>
        </view>
        <rich-text :nodes="text"></rich-text>
      </view>
    </view>
   
  </view>
</template>

<script>
//index.js
const app = getApp().globalData;
import iTabBar from "../../dist/tab-bar/index";
import iTabBarItem from "../../dist/tab-bar-item/index";
import iCard from "../../dist/card/index";
import iCellGroup from "../../dist/cell-group/index";
import iCell from "../../dist/cell/index";
import iGrid from "../../dist/grid/index";
import iGridItem from "../../dist/grid-item/index";
import iGridIcon from "../../dist/grid-icon/index";
import iGridLabel from "../../dist/grid-label/index";

export default {
  data() {
    return {
      text: '',
      biaoti: "",
      title: ""
    };
  },

  components: {
    iTabBar,
    iTabBarItem,
    iCard,
    iCellGroup,
    iCell,
    iGrid,
    iGridItem,
    iGridIcon,
    iGridLabel
  },
  props: {},
  onLoad: function (options) {
    if (options.cate == 0) {
		this.biaoti = "产品介绍"
		this.get_inner();
	  
    }
	if (options.cate == 1) {
		this.biaoti = "招商加盟介绍"
		this.get_inner();
	  
	}
    
    if (options.cate == 2) {
		this.biaoti = "公司介绍"
		this.get_inner();
	  
    }
	if (options.cate == 3) {
		this.biaoti = "反馈介绍"
		this.get_inner();
	  
	}
	
    
  
   
  },
  methods: {
    get_inner: function (id) {
      var _this = this;

      uni.request({
        url: app.post_url + '/aijiu/api.Article/articleInfo',
        //仅为示例，并非真实的接口地址
        data: {
          name: this.biaoti
        },
        method: 'post',

        success(res) {

          if (res.data.code == 1) {
			  _this.text = res.data.data ? res.data.data.content : ''
			  _this.title = res.data.data ? res.data.data.name : ''
            
          }
        }

      });
    }
  }
};
</script>
<style>
@import "./index.css";
</style>